package com.example.util.im
import java.util.*

/**
 * 消息列表观察者
 * @author  chaohaipeng  on 2018/7/24.
 */
class MessageListEvent : Observable() {
    private object mHolder {
        val instance = MessageListEvent()
    }
    companion object {
        fun getInstance(): MessageListEvent {
            return mHolder.instance
        }
    }

    /**
     * 主动通知新消息
     */
    fun onNewMessage(message: Any) {
        setChanged()
        notifyObservers(message)

    }
}